Группа :: Науки/Химия
Пакет: gnome-chemistry-utils
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: gnome-chemistry-utils-0.14.17-deb-gchempaint-merge-molecules-fix.patch
Скачать
Скачать
From: Jean Brц╘fort <jean.brefort@free.fr>
Date: Mon, 8 Mar 2021 14:58:39 +0100
Subject: Fix merging two molecules in gchempaint
Reviewed-by: Daniel Leidert <dleidert@debian.org>
Origin: https://savannah.nongnu.org/patch/index.php?10041
Forwarded: not-needed
---
plugins/paint/selection/selectiontool.cc | 12 ++++++------
plugins/paint/selection/selectiontool.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/plugins/paint/selection/selectiontool.cc b/plugins/paint/selection/selectiontool.cc
index 02ef020..4593ba9 100644
--- a/plugins/paint/selection/selectiontool.cc
+++ b/plugins/paint/selection/selectiontool.cc
@@ -75,13 +75,13 @@ static void on_merge (G_GNUC_UNUSED GtkWidget *btn, gcp::Application* App)
gcpSelectionTool::gcpSelectionTool (gcp::Application *App): gcp::Tool (App, "Select")
{
m_bRotate = false;
- m_UIManager = NULL;
+// m_UIManager = NULL;
}
gcpSelectionTool::~gcpSelectionTool ()
{
- if (m_UIManager)
- delete m_UIManager;
+// if (m_UIManager)
+// delete m_UIManager;
}
bool gcpSelectionTool::OnClicked ()
@@ -238,7 +238,7 @@ void gcpSelectionTool::OnRelease ()
void gcpSelectionTool::Activate ()
{
- if (m_UIManager)
+ if (GTK_IS_WIDGET (m_MergeBtn))
gtk_widget_set_sensitive (m_MergeBtn, false);
gcp::Document *pDoc = m_pApp->GetActiveDocument ();
if (pDoc) {
@@ -283,14 +283,14 @@ void gcpSelectionTool::AddSelection (gcp::WidgetData* data)
m_pData = d;
}
// If the selection is made of two molecules, activate the merge tool
- if (m_UIManager) {
+/* if (m_UIManager) */{
std::set < Object * >::iterator i = m_pData->SelectedObjects.begin ();
gtk_widget_set_sensitive (m_MergeBtn, ((m_pData->SelectedObjects.size () == 2) &&
((*i++)->GetType () == MoleculeType) &&
((*i)->GetType () == MoleculeType)));
}
} else {
- if (m_UIManager)
+// if (m_UIManager)
gtk_widget_set_sensitive (m_MergeBtn, false);
win->ActivateActionWidget ("/MainMenu/EditMenu/Erase", false);
}
diff --git a/plugins/paint/selection/selectiontool.h b/plugins/paint/selection/selectiontool.h
index d9855cf..30624b4 100644
--- a/plugins/paint/selection/selectiontool.h
+++ b/plugins/paint/selection/selectiontool.h
@@ -72,7 +72,7 @@ private:
gcp::Operation *m_pOp;
gcu::TypeId m_Type;
std::list<int> m_uiIds;
- gcugtk::UIManager *m_UIManager;
+// gcugtk::UIManager *m_UIManager;
GtkWidget *m_MergeBtn;
};