1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 11:47:24 +01:00

see #1447 Reverting change done for ticket #1447 in r2892 and

r2896 because of the user complaints. It appears to be more
convenient if Policy, NAT and Routing objects open in the rule set
view on double click but not in the editor. Second double clik
opens these objects in the editor.
This commit is contained in:
Vadim Kurland 2010-05-28 23:37:03 +00:00
parent e5656609a3
commit b384feabb6
4 changed files with 35 additions and 10 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 2936
#define BUILD_NUM 2937

View File

@ -1,3 +1,12 @@
2010-05-28 vadim <vadim@vk.crocodile.org>
* ObjectManipulator.cpp (ObjectManipulator::editSelectedObject):
see #1447 Reverting change done for ticket #1447 in r2892 and
r2896 because of the user complaints. It appears to be more
convenient if Policy, NAT and Routing objects open in the rule set
view on double click but not in the editor. Second double clik
opens these objects in the editor.
2010-05-25 vadim <vadim@vk.crocodile.org>
* configure.in (CPPUNIT_LIBS): fixed #1478 always use included

View File

@ -1024,15 +1024,31 @@ void ObjectManipulator::editSelectedObject()
if (RuleSet::cast(obj)!=NULL)
{
// Menu item "Edit" always opens rule set in RuleSetView and in the editor
// Menu item "Open" opens only in RuleSetView. openSelectedRuleSet()
// does that.
openSelectedRuleSet();
}
// Open rule set object in the editor if it is already opened
// in RuleSetView. If we just opened it in RuleSetView, check
// if the editor is visible and if yes, open the object in the
// editor right away. See #1331
QCoreApplication::postEvent(
mw, new openObjectInEditorEvent(
m_project->getFileName(), obj->getId()));
if (m_project->getCurrentRuleSet() == obj)
{
QCoreApplication::postEvent(
mw, new openObjectInEditorEvent(
m_project->getFileName(), obj->getId()));
} else
{
QCoreApplication::postEvent(
m_project, new openRulesetEvent(
m_project->getFileName(), obj->getId()));
if (mw->isEditorVisible())
QCoreApplication::postEvent(
mw, new openObjectInEditorEvent(
m_project->getFileName(), obj->getId()));
}
} else
QCoreApplication::postEvent(
mw, new openObjectInEditorEvent(
m_project->getFileName(), obj->getId()));
}
void ObjectManipulator::openSelectedRuleSet()

View File

@ -80,7 +80,7 @@ void ObjectManipulatorTest::editSelectedObject()
tree->setCurrentItem(
policy, 0, QItemSelectionModel::Clear | QItemSelectionModel::SelectCurrent);
om->openSelectedRuleSet();
om->editSelectedObject();
QTest::qWait(100);
QVERIFY(mw->getOpenedEditor() == NULL);
QVERIFY(mw->activeProject()->getCurrentRuleSet() == RuleSet::cast(policy->getFWObject()));