mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 00:19:55 +02:00
* FWCmdChange.cpp (FWCmdChange::notify): fixes #1139
GUI crash on click in undo panel view. Sequence that caused crash: 1) new firewall next next finish 2) rename firewall couple of times 3) click to top of undo stack and it crashes
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2010-01-26 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* FWCmdChange.cpp (FWCmdChange::notify): fixes #1139
|
||||
GUI crash on click in undo panel view. Sequence that caused crash:
|
||||
1) new firewall next next finish
|
||||
2) rename firewall couple of times
|
||||
3) click to top of undo stack and it crashes
|
||||
|
||||
* DiscoveryDruid.cpp (DiscoveryDruid::createRealObjects): fixes #1144
|
||||
after snmp discovery object attributes are not shown properly
|
||||
in the tree
|
||||
|
||||
@@ -30,7 +30,6 @@ using namespace libfwbuilder;
|
||||
|
||||
FWCmdBasic::FWCmdBasic(ProjectPanel *project, QUndoCommand* macro):QUndoCommand(macro)
|
||||
{
|
||||
|
||||
this->project = project;
|
||||
}
|
||||
|
||||
@@ -46,21 +45,19 @@ FWObject* FWCmdBasic::getObject(int id)
|
||||
|
||||
bool FWCmdBasic::mergeWith(const QUndoCommand *other)
|
||||
{
|
||||
qDebug() << "FWCmdBasic::mergeWith(const QUndoCommand *other)";
|
||||
qDebug() << "FWCmdBasic::mergeWith(const QUndoCommand *other) other=" << other;
|
||||
qDebug() << "cmd:" << other->text();
|
||||
|
||||
const FWCmdTerm* term = dynamic_cast<const FWCmdTerm*> (other);
|
||||
|
||||
const FWCmdTerm* term = dynamic_cast<const FWCmdTerm*>(other);
|
||||
return term != 0;
|
||||
}
|
||||
|
||||
bool FWCmdMacro::mergeWith(const QUndoCommand *other)
|
||||
{
|
||||
qDebug() << "FWCmdMacro::mergeWith(const QUndoCommand *other)";
|
||||
qDebug() << "FWCmdMacro::mergeWith(const QUndoCommand *other) other=" << other;
|
||||
qDebug() << "cmd:" << other->text();
|
||||
|
||||
const FWCmdTerm* term = dynamic_cast<const FWCmdTerm*> (other);
|
||||
|
||||
return term != 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,15 @@ void FWCmdChange::notify()
|
||||
// automatic renaming of child objects. This should only be
|
||||
// done once, even if we have the same data file opened in
|
||||
// several project panels.
|
||||
QCoreApplication::postEvent(
|
||||
//
|
||||
// Use sendEvent to make sure event is processed right now and
|
||||
// is not postponed. This is important when this command is
|
||||
// executed as part of a group undo/redo (when user clicks in
|
||||
// the undo panel). If this command is posted to event queue,
|
||||
// it is executed after bunch of objects are deleted and may
|
||||
// need to operate on one of them.
|
||||
//
|
||||
QCoreApplication::sendEvent(
|
||||
mw->activeProject(), new objectNameChangedEvent(
|
||||
filename, obj->getId(),
|
||||
QString::fromUtf8(oldState->getName().c_str()),
|
||||
|
||||
Reference in New Issue
Block a user