mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 16:39:48 +02:00
copy/paste rules between data files
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2008-08-19 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* RuleSetView.cpp (RuleSetView::pasteRuleAbove): Permit copy/paste
|
||||
of individual rules between two data files. When a rule is copied
|
||||
this way, all objects used in this rule are copied as well.
|
||||
|
||||
* FWWindow.cpp (FWWindow::recreateWindowsMenu): fixed typo in the
|
||||
main menu item name
|
||||
|
||||
2008-08-18 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* Compiler.cpp (Compiler::complexMatch): (change in libfwbuilder)
|
||||
|
||||
@@ -1528,7 +1528,7 @@ void FWWindow::recreateWindowsMenu ()
|
||||
m_mainWindow->menuWindow->clear();
|
||||
QAction * close = m_mainWindow->menuWindow->addAction ("Close");
|
||||
QAction * closeAll = m_mainWindow->menuWindow->addAction ("Close All");
|
||||
QAction * title = m_mainWindow->menuWindow->addAction ("Title");
|
||||
QAction * title = m_mainWindow->menuWindow->addAction ("Tile");
|
||||
QAction * cascade = m_mainWindow->menuWindow->addAction ("Cascade");
|
||||
QAction * next = m_mainWindow->menuWindow->addAction ("Next");
|
||||
QAction * previous = m_mainWindow->menuWindow->addAction ("Previous");
|
||||
|
||||
@@ -1772,8 +1772,11 @@ FWObject* ObjectManipulator::duplicateWithDependencies(FWObject *target,
|
||||
nobj->ref();
|
||||
//if renew_id == true creates new object ID
|
||||
nobj->duplicate(obj, true);
|
||||
makeNameUnique(target, nobj);
|
||||
target->add( nobj );
|
||||
if (target)
|
||||
{
|
||||
makeNameUnique(target, nobj);
|
||||
target->add( nobj );
|
||||
}
|
||||
|
||||
map_ids[obj->getId()] = nobj->getId();
|
||||
|
||||
|
||||
+11
-2
@@ -4319,9 +4319,18 @@ void RuleSetView::pasteRuleAbove()
|
||||
for (i= FWObjectClipboard::obj_clipboard->rbegin();
|
||||
i!=FWObjectClipboard::obj_clipboard->rend(); ++i)
|
||||
{
|
||||
FWObject *co= m_project->db()->findInIndex(i->first);
|
||||
ProjectPanel *proj_p = i->second;
|
||||
FWObject *co = proj_p->db()->findInIndex(i->first);
|
||||
if (!Rule::cast(co)) continue;
|
||||
insertRule( firstSelectedRow, co);
|
||||
if (proj_p==m_project)
|
||||
{
|
||||
insertRule( firstSelectedRow, co);
|
||||
} else
|
||||
{
|
||||
// rule is being copied from another project file
|
||||
co = m_project->m_panel->om->duplicateWithDependencies(NULL, co);
|
||||
insertRule( firstSelectedRow, co);
|
||||
}
|
||||
}
|
||||
|
||||
changingRules = false;
|
||||
|
||||
Reference in New Issue
Block a user