[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: kpresenter sidbar patch
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2002-07-29 5:52:03
[Download RAW message or body]
Hello all
the following patch add support for some more commands to update the sidebar.
Is it ok to commit?
Thorsten
PS. should also the sticky command have this feature?
["patch19" (text/x-diff)]
Index: kprcommand.cc
===================================================================
RCS file: /home/kde/koffice/kpresenter/kprcommand.cc,v
retrieving revision 1.130
diff -u -3 -p -r1.130 kprcommand.cc
--- kprcommand.cc 2002/07/25 13:08:19 1.130
+++ kprcommand.cc 2002/07/29 05:48:04
@@ -364,6 +364,12 @@ void ChgPixCmd::execute()
{
m_page->insertObject(oldObject, newObject);
doc->repaint( newObject );
+
+ if ( doc->refreshSideBar())
+ {
+ int pos=doc->pageList().findRef(m_page);
+ doc->updateSideBarItem(pos, (m_page == doc->stickyPage()) ? true: false );
+ }
}
/*====================== unexecute ===============================*/
@@ -371,6 +377,12 @@ void ChgPixCmd::unexecute()
{
m_page->insertObject(newObject, oldObject);
doc->repaint( oldObject );
+
+ if ( doc->refreshSideBar())
+ {
+ int pos=doc->pageList().findRef(m_page);
+ doc->updateSideBarItem(pos, (m_page == doc->stickyPage()) ? true: false );
+ }
}
/******************************************************************/
@@ -423,6 +435,7 @@ void DeleteCmd::execute()
}
if(textObj)
doc->updateRuler();
+
if ( doc->refreshSideBar())
{
int pos=doc->pageList().findRef(m_page);
@@ -439,9 +452,9 @@ void DeleteCmd::unexecute()
objects.at( i )->addToObjList();
doc->repaint( objects.at( i ) );
}
+
if ( doc->refreshSideBar())
{
-
int pos=doc->pageList().findRef(m_page);
doc->updateSideBarItem(pos, (m_page == doc->stickyPage()) ? true: false );
}
@@ -1663,6 +1676,8 @@ PictureSettingCmd::PictureSettingCmd( co
doc = _doc;
newSettings = _newSettings;
+ m_page = doc->findSideBarPage( objects );
+
QPtrListIterator<KPObject> it( objects );
for ( ; it.current() ; ++it )
it.current()->incCmdRef();
@@ -1693,6 +1708,12 @@ void PictureSettingCmd::execute()
}
}
doc->repaint( false );
+
+ if ( doc->refreshSideBar())
+ {
+ int pos=doc->pageList().findRef(m_page);
+ doc->updateSideBarItem(pos, (m_page == doc->stickyPage()) ? true: false );
+ }
}
/*====================== unexecute ===============================*/
@@ -1709,6 +1730,12 @@ void PictureSettingCmd::unexecute()
}
}
doc->repaint( false );
+
+ if ( doc->refreshSideBar())
+ {
+ int pos=doc->pageList().findRef(m_page);
+ doc->updateSideBarItem(pos, (m_page == doc->stickyPage()) ? true: false );
+ }
}
/******************************************************************/
Index: kprcommand.h
===================================================================
RCS file: /home/kde/koffice/kpresenter/kprcommand.h,v
retrieving revision 1.66
diff -u -3 -p -r1.66 kprcommand.h
--- kprcommand.h 2002/07/25 13:08:20 1.66
+++ kprcommand.h 2002/07/29 05:48:04
@@ -673,6 +673,7 @@ protected:
QPtrList<PictureSettings> oldSettings;
QPtrList<KPObject> objects;
PictureSettings newSettings;
+ KPrPage *m_page;
};
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic